The EVWAIT Sample accompanies Chapter 9 and illustrates how an application can wait on an event set by a WDM driver.
The sample includes two components:
To build EVWAIT.SYS, follow the general instructions for building a WDM sample. The Microsoft Visual C++ project file is named EVWAIT.DSP in the SYS subdirectory.
To build TEST.EXE, follow the general instructions for building user-mode programs. The Microsoft Visual C++ project file is named TEST.DSP in the TEST subdirectory.
First install EVWAIT.SYS. Follow the general instructions for using FastInst in Windows 2000 or the Add New Hardware wizard in Windows 98. The INF file is named SYS\DEVICE.INF.
To test EVWAIT, open a command prompt and launch TEST.EXE from the TEST\DEBUG subdirectory. TEST will use an I/O Control operation to communicate an event handle to EVWAIT and then wait for you to type a keystroke on the keyboard. You can perform three different tests: